package org.bbelovic.devel.algorithms.recursive;

public class Main {

    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        long x = fibonacci(48);
        long stop = System.currentTimeMillis();
        System.out.println("result=" + x + ", time="+ (stop-start)/1000);
        
    }
    
    private static int gdc(int p, int q) {
        if (q == 0) {
            return p;
        } else {
            int x =  gdc(q, p%q);
            return x;
        }
    }
    
    private static long fibonacci(long n) {
        if (n == 0) return 0L;
        else if (n == 1) return 1L;
        else return fibonacci(n-1) + fibonacci(n-2);
    }
}
